﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace HECore.Account.Repository.Migrations
{
    public partial class Init : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Account",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "账号Id"),
                    NickName = table.Column<string>(type: "nvarchar(55)", maxLength: 55, nullable: false, comment: "账号昵称"),
                    Avatar = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "账号头像"),
                    Mobile = table.Column<string>(type: "nvarchar(11)", maxLength: 11, nullable: true, comment: "账号手机"),
                    Email = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true, comment: "账号邮箱"),
                    Password = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false, comment: "账号密码"),
                    CreatorAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "创建人"),
                    CreationTime = table.Column<DateTime>(type: "datetime", nullable: false, comment: "创建时间"),
                    ModifiedAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "最后修改人"),
                    ModifiedTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最后修改时间"),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false, comment: "是否逻辑删除"),
                    DeleterAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "删除人"),
                    DeletionTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "删除时间")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Account", x => x.Id);
                },
                comment: "账号表");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Account");
        }
    }
}
